import request from "../utils/request";
// 获取菜单列表
export async function fetMenuList(params) {
    return await request.get('menu/menuSearch', {params: params})
}
// 添加菜单
export async function increaseMenu(params) {
    return await request.post('menu/insert', params)
}
//编辑菜单
export async function updateMenu(params) {
    return await request.post('menu/update', params)
}
// 删除菜单
export async function deleteMenu(params) {
    return await request.get('menu/delete', {params: params})
}
// 获取角色列表
export async function fetchRoleList(params) {
    return await request.post('userGroup/list', params)
}

// 添加角色
export async function increaseRole(params) {
    return await request.post('userGroup/add', params)
}

// 修改角色
export async function updateRole(params) {
    return await request.post('userGroup/update', params)
}

// 角色事业部绑定
export async function roleBusinessBind(params) {
    return await request.post('userGroup/businessBind', params)
}
// 获取国家战区
export async function fetchNationalTheater(params) {
    return await request.get('business/allBusiness', {params: params})
}
// 获取事业部列表
export async function fetchBusinessList(params) {
    return await request.get('business/businessList', {params: params})
}
// 添加事业部
export async function increaseBusiness(params) {
    return await request.post('business/add', params)
}
// 修改事业部
export async function updateBusiness(params) {
    return await request.post('business/update', params)
}
// 获取已绑定的事业部
export async function fetchBindBusiness(params) {
    return await request.get('userGroup/getBusiness', {params})
}
// 查询当前角色权限
export async function fetchPermission(params) {
    return await request.get('menu/selectGroupPermission', {params})
}

export async function updateStatus(params) {
    return await request.post('role/updateStatus', params)
}

export async function fetchUserList(params) {
    return await request.post('user/list', params)
}

export async function increaseUser(params) {
    return await request.post('user/add', params)
}

export async function resetPassword(params) {
    return await request.get('system/resetPassword', {params: params})
}

export async function staffUpdateStatus(params) {
    return await request.post('system/updateStatus', params)
}

export async function updateUser(params) {
    return await request.post('user/update', params)
}
